home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / stk-3.002 / stk-3 / STk-3.1 / Extensions / Makefile.sample < prev    next >
Encoding:
Makefile  |  1996-02-22  |  2.8 KB  |  100 lines

  1. # M a k e f i l e . s a m p l e        -- A Makefile prototype for compiling
  2. #                       extensions which are dynamically 
  3. #                       loaded
  4. # Copyright ⌐ 1993-1996 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
  5. #
  6. # Permission to use, copy, and/or distribute this software and its
  7. # documentation for any purpose and without fee is hereby granted, provided
  8. # that both the above copyright notice and this permission notice appear in
  9. # all copies and derived works.  Fees for distribution or use of this
  10. # software or derived works may only be charged with express written
  11. # permission of the copyright holder.  
  12. # This software is provided ``as is'' without express or implied warranty.
  13. #
  14. #           Author: Erick Gallesio [eg@kaolin.unice.fr]
  15. #    Creation date: 17-Mar-1995 10:20
  16. # Last file update: 17-Mar-1995 10:48
  17.  
  18.  
  19. #####
  20. ##### Start of configuration section
  21. #####
  22.  
  23. CC=gcc
  24. LIBMALLOC=
  25. INCLUDES = -I../Tk -I../Tcl -I../Src -I../Mp
  26.  
  27.  
  28. # Define the 4 next line if you are running SUNOS4
  29. # Use -pic if using acc and fpic if using gcc
  30.      SH_CCFLAGS=-fpic
  31.      SH_LDFLAGS=-assert pure-text -o
  32.      SH_LOADER=ld
  33.      SH_SUFFIX=so
  34. # Define the 4 next lines if you are running SUNOS5
  35. #     SH_CCFLAGS=-K pic
  36. #     SH_LDFLAGS=-G -z text -h
  37. #     SH_LOADER=ld
  38. #     SH_SUFFIX=so
  39. # Define the 4 next lines if you are running OSF1
  40. #     SH_CCFLAGS=-fpic
  41. #     SH_LDFLAGS=-shared -o
  42. #     SH_LOADER=ld
  43. #     SH_SUFFIX=so 
  44. # Define the 4 next lines if you are running NETBSD1)
  45. #     SH_CCFLAGS=-fpic
  46. #     SH_LDFLAGS=-Bshareable -o
  47. #     SH_LOADER=ld
  48. #     SH_SUFFIX=so
  49. # Define the 5 next lines if you are running HPUX
  50. #     SH_CCFLAGS=+Z
  51. #     SH_LDFLAGS=-b -o
  52. #     SH_LOADER=ld
  53. #     SH_SUFFIX=sl
  54. #     CFLAGS=$CFLAGS -Wl,-E
  55. # Define the 5 next lines if you are running FREEBSD
  56. #     SH_CCFLAGS=-pic
  57. #     SH_LDFLAGS=-Bshareable -o
  58. #     SH_LOADER=ld
  59. #     LIB_MALLOC=/usr/lib/libgnumalloc.a
  60. #     SH_SUFFIX=so
  61. # Define the 4 next lines if you are running IRIX5
  62. #     SH_CCFLAGS=-fpic
  63. #     SH_LDFLAGS=-shared -o
  64. #     SH_LOADER=$CC
  65. #     SH_SUFFIX=so 
  66. # Define the 4 next lines if you are running LINUX
  67. #     SH_CCFLAGS=
  68. #     SH_LDFLAGS=-r -o
  69. #     SH_LOADER=ld
  70. #     SH_SUFFIX=so      
  71. #
  72.  
  73. ####
  74. #### End of of configuration section
  75. ####
  76.  
  77.  
  78. ##############################################################################
  79. .SUFFIXES: .$(SH_SUFFIX) .o .c
  80.  
  81. .c.$(SH_SUFFIX):
  82.     $(CC) $(CFLAGS) -c -o $*.o $*.c
  83.     $(SH_LOADER) $(SH_LDFLAGS) $*.$(SH_SUFFIX) $*.o
  84.     if test -f a.out  ;then mv a.out $*.$(SH_SUFFIX); fi
  85. .o.$(SH_SUFFIX): 
  86.     $(SH_LOADER) $(SH_LDFLAGS) $*.$(SH_SUFFIX) $<
  87.     if test -f a.out  ;then mv a.out $*.$(SH_SUFFIX); fi
  88.  
  89. ##############################################################################
  90. CFLAGS = $(SH_CCFLAGS) $(INCLUDES) 
  91.  
  92. help:
  93.     @echo "To make a new xxx.$(SH_SUFFIX) file, just type"
  94.     @echo "       make xxx.$(SH_SUFFIX)"
  95.  
  96. clean:
  97.     @/bin/rm -f *.o *.$(SH_SUFFIX) core *~ 
  98.